1. Field of the Invention
The present invention relates to a serial communication system. More specifically, the present invention relates to a serial communication system which performs a serial communication between a master processor and a slave processor.
2. Description of the Related Art
In the related art of a serial communication system of such a kind, a communication between a master microcomputer and a slave microcomputer is executed in a following manner.
First, the master microcomputer sets a communication request signal CDREQ to an L level in order to request a communication with the slave microcomputer. The slave microcomputer sets an answer signal CDRDY to an L level in order to respond to the communication request. The master microcomputer makes a CMCLK to an L level when the answer signal CDRDY of the L level is detected. The slave microcomputer determines that a communication is started by the L level of the CMCLK, and sets the answer signal CDRDY to an H level. The master microcomputer determines that a communication is started by the H level of the CDRDY, and starts a communication.
The master microcomputer sets the CMCLK to an H level and fetches data from the slave microcomputer. The slave microcomputer also fetches data from the master microcomputer when the CMCLK becomes the H level. The master microcomputer then sets next data to be transmitted, and sets the CMCLK to an L level. The slave microcomputer also sets next data when the CMCLK becomes the L level.
The slave microcomputer sets an answer signal CDRDY to an L level every time that data transfer of four bits data is completed. The slave microcomputer then sets next data to be transmitted and then sets the answer signal CDRDY to an H level. The master microcomputer confirms that the answer signal CDRDY becomes an L level every time that data transfer of four bits data is completed, and sets data to be transmitted next after the confirmation. The master microcomputer next sets the CMCLK to an H level by confirming that the answer signal CDRDY becomes the H level. Thereafter, the processing as described above is repeated.
After completion of data transfer of 4 bits×12 words, the slave microcomputer sets the answer signal CDRDY to an L level. The master microcomputer confirms that the answer signal CDRDY becomes the L level after completion of the data transfer of 4 bits×12 words, and sets the communication request signal CDREQ to an H level after the confirmation in order to complete the communication. The slave microcomputer confirms that the communication request signal CDREQ becomes the H level, and sets the answer signal CDRDY to an H level in order to end the communication.
However, the level of the answer signal CDRDY has to be changed between an L level and an H level at a start of the communication, at an end of the transfer of 4 bits data, and at an end of the transfer of 4 bits×12 words. Thus, in the related art, there is a problem of causing complicated processing.